﻿<?xml version="1.0" encoding="utf-8"?>
<Window
    x:Class="Automator.Windows.SaveWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Save Document"
    WindowStartupLocation="CenterOwner"
    ShowInTaskbar="False"
    ShowActivated="True"
    ResizeMode="CanMinimize"
    Background="{x:Static SystemColors.ControlBrush}"
    Loaded="Window_Loaded"
    Width="400"
    Height="190">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>
        <RadioButton
            Content="Save To File System"
            IsChecked="True"
            Grid.Row="0"
            Margin="8"
            x:Name="rbFileSystem"
            Click="RbFileSystem_Click"
            TabIndex="0" />
        <DockPanel
            LastChildFill="True"
            Grid.Row="1">
            <Button
                x:Name="btnSave"
                DockPanel.Dock="Right"
                Margin="0,4,4,4"
                ToolTip="Choose file"
                Click="BtnSave_Click"
                Padding="4,1,4,1">
                <Image
                    Source="/Automator;component/resources/save.png"
                    Width="16"
                    Height="16" />
            </Button>
            <TextBox
                x:Name="edtFileName"
                Margin="4"
                VerticalContentAlignment="Center" />
        </DockPanel>
        <RadioButton
            Content="Save To SQL Server"
            IsChecked="False"
            Grid.Row="2"
            Margin="8"
            x:Name="rbDatabase"
            Click="RbFileSystem_Click"
            TabIndex="0" />
        <TextBox
            x:Name="edtDatabaseName"
            Margin="4"
            VerticalContentAlignment="Center"
            Grid.Row="3" />
        <StackPanel
            Orientation="Horizontal"
            Grid.Row="4"
            HorizontalAlignment="Right">
            <Button
                Name="btnOk"
                Content="OK"
                Padding="16,4,16,4"
                Click="BtnOk_Click"
                Margin="4" />
            <Button
                Name="btnCancel"
                Content="Cancel"
                Padding="16,4,16,4"
                Margin="4"
                IsCancel="True" />
        </StackPanel>
    </Grid>
</Window>